package com.common.config;

import com.common.entity.SnowflakeIdWorker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description
 * @Date 2020/5/25
 * @Author gm
 */
@Configuration
public class SnowflakeIdWorkerConfig {

    /**
     * @return com.common.entity.SnowflakeIdWorker
     * @Description //雪花ID生成器
     * @Param []
     * @Author gm
     * @Date 2020/5/25
     **/
    @Bean
    public SnowflakeIdWorker snowflakeIdWorker() {
        Long worId = Long.valueOf("0");
        Long dataId = Long.valueOf("0");
        return new SnowflakeIdWorker(worId, dataId);
    }
}
